package com.qg.dto;

public class ReturnResultUtil {
    public static ReturnResult resultsuccess(Object data){
        ReturnResult returnResult=new ReturnResult();
        returnResult.setCode(0);
        returnResult.setData(data);
        return returnResult;
    }
    public static ReturnResult resultsuccess(Object data,String message){
        ReturnResult returnResult=new ReturnResult();
        returnResult.setCode(0);
        returnResult.setMessage(message);
        return returnResult;
    }
    public static ReturnResult resultsuccess(){
        ReturnResult returnResult=new ReturnResult();
        returnResult.setCode(0);
        return returnResult;
    }
    public static ReturnResult returnFail(Integer code,String message){
        ReturnResult returnResult=new ReturnResult();
        returnResult.setCode(code);
        returnResult.setMessage(message);
        return returnResult;
    }
}
